Strikethrough Text using <del> Tag
The <del> tag is used to indicate deleted text, typically rendering it with a strikethrough effect by default. The deleted text is rendered as strike-through text by the web browsers.
<!DOCTYPE html>
<html>
<head>
<title>Strikethrough Text</title>
</head>
<body>
<p>
w3wiki is a <del>Math</del>
Computer Science Portal.
</p>
</body>
</html>
Output:
w3wiki is aMathComputer Science Portal.
How to Mark Strikethrough Text in HTML?
Strikethrough Text is a visual formatting style applied to text where a horizontal line is drawn through the characters. For Example – Strikethrough Text. It is commonly used to indicate that the text is no longer valid, deleted, or that there has been a change or correction made to the content.
There are several methods to achieve this, including the <s>, <del>, and <strike> tags, as well as using CSS. In this article, we will cover all approaches to mark strikethrough text in HTML.
Table of Content
- Using the <s> Tag
- Using the <del> Tag
- Using the <strike> Tag
- Using CSS